package net.hn.hnms.biz.common.activiti.params;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * Created on 2022/8/1.
 *
 * @author ly
 * @desc: 动态流程步骤创建参数
 */
@ApiModel("动态流程步骤创建参数")
public class ProcessStepParam implements Serializable {
    @ApiModelProperty("退回节点名称")
    private String rollBackNode;

    @ApiModelProperty("节点集合")
    private List<ProcessNodeParam> nodes = new ArrayList<>();

    public void addNode(ProcessNodeParam request) {
        if (this.nodes == null) {
            this.nodes = new ArrayList<>();
        }
        this.nodes.add(request);
    }

    public void addNodes(List<ProcessNodeParam> nodes) {
        if (this.nodes == null) {
            this.nodes = new ArrayList<>();
        }
        this.nodes.addAll(nodes);
    }

    public List<ProcessNodeParam> getNodes() {
        return nodes;
    }

    public String getRollBackNode() {
        return rollBackNode;
    }

    public void setRollBackNode(String rollBackNode) {
        this.rollBackNode = rollBackNode;
    }
}
